﻿@model List<Pku.BookStore.Model.ProductModel>
@using Pku.BookStore.Web.Controllers;
@{
    Layout = "~/Views/Shared/_AdminLayout.cshtml";
    ViewBag.Title = "图书列表-后台管理";
}
<link href="/Content/user.self.css" rel="stylesheet" type="text/css" />
<script src="/Scripts/jsAddress.js" type="text/javascript"></script>
<div class="right">
    <div class="o-mt">
        <h2>
            图书列表</h2>  <a href="/Admin/ProductEdit" style=" margin:20px ">新增图书</a>
    </div>
    <div class="m m5" id="buy-area" data-widget="tabs">
        <div class="mc">
            <div class="tabcon" id="order-list" data-widget="tab-content">
                <div class="mc">
                    <div id="order-list" class="tabcon">
                        <div id="latelyOrderListDiv" class="tb-void tb-rows">
                            <table cellspacing="0" cellpadding="0" border="0" width="100%">
                                <tbody>
                                    <tr>
                                        <th width="80">
                                            图书ID
                                        </th>
                                        <th width="200">
                                            图书名称
                                        </th>
                                        <th width="90">
                                            ISBN
                                        </th>
                                        <th width="90">
                                            封面图片
                                        </th>
                                        <th width="90">
                                            作者
                                        </th>
                                        <th width="100">
                                            成本/原价/售价
                                        </th>
                                        <th width="80">
                                            操作
                                        </th>
                                    </tr>
                                    @{
                                        foreach (var item in Model)
                                        {
                                        <tr>
                                            <td>
                                                @item.BookID
                                            </td>
                                            <td>
                                                @item.BookName
                                            </td>
                                            <td>
                                                @item.ISBN
                                            </td>
                                            <td>
                                                <div class="img-list" style=" width:60px">
                                                    <a href="/Product/Detail/@item.BookID" target="_blank">
                                                        <img src="@item.Image" title="@item.BookName" width="60" /></a>
                                                </div>
                                            </td>
                                            <td>
                                                @item.Author
                                            </td>
                                            <td>
                                                ￥@item.CostPrice.ToString() <br>￥ @item.Price.ToString() <br>￥ @item.TruePrice.ToString()
                                            </td>
                                            <td>
                                                <a href="/Admin/ProductEdit/@item.BookID">查看/修改</a><br><a href="/Admin/ProductEdit/@item.BookID?Act=D" onclick="return confirm('你确定删除该记录吗?');">删除</a>
                                            </td>
                                        </tr>
                                        }
                                    }
                                </tbody>
                            </table>
                        </div>
                        <div class="pager">@Html.Raw(UserControls.Pager(Html, "p", 10, ViewBag.productCount))</div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <!--buy-area-->
</div>
